package com.zhuss.controller.version;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.zhuss.bean.bo.core.version.VersionCompareBo;
import com.zhuss.common.BaseController;
import com.zhuss.core.version.VersionReadService;
import com.zhuss.exception.DzcxException;


/**
 * 订单操作 controller
 * @Author zhushanshuo
   @Date 2020/03/11 16:01
 *
 */
  
 
@RestController
@RequestMapping("/version")
public class VersionReadController extends BaseController {
	
	@Autowired
	@Qualifier("versionReadService")
	private VersionReadService versionReadService;
	
	/**
	 * app版本比对
	 * @param bo
	 * @throws DzcxException
	 */
	@ResponseBody
    @PostMapping("/compare")
	@Transactional(rollbackFor = Exception.class)
    public Object compare(@RequestBody VersionCompareBo bo) throws DzcxException {
		Object result = versionReadService.compare(bo);
		return result;
    }

}
